#include <iostream>

int main(){
	// y=1+1/1!+1/2!+...+1/n!
	int n;
	std::cout << "y=1+1/1!+1/2!+...+1/n!" << "\n";
	std::cout << "nermucel n: ";
	std::cin >> n;
	double y= 1;
	double m= 1;
	for (int i=1; i<=n; ++i){
		m=m*i;
		y=y+1/m;
	}
	std::cout << "y=" << y << "\n";
	return 0;
}